The accumulation of heavy metal ions in nature will not only lead to the further deterioration of the environment, but also directly do harm to human health. And as a gas pollutant, excessive inhalation of formaldehyde is also harmful to human health. Herein, a novel Eu-MOF was synthesized by solvothermal method using Eu3+, 2-pyridine-4-yl-3H-benzimidazole-5-carboxylic acid (HL) and 1,10-phenanthroline (phen), which can be used as a ratio fluorescent probe to detect Hg2+, Cd2+ and formaldehyde, and the limits of detection(LOD) can reach 34, 9.91 and 194 nM respectively. Among them, the LOD of Eu-MOF for Cd2+ has reached the lowest level at present. Noticeable, Eu-MOF can detect formaldehyde in both liquid and gas phases, and the response time is extremely short. In addition, Eu-MOF has been applied to trace detection of Hg2+ and Cd2+ in tap water, lake water and sea water with satisfactory recoveries (ranging from 98.10 % to 103.0 %). A program has been developed for quickly calculating the concentration of the substances to be detected by capturing the fluorescent color of the solvents under the ultraviolet light.